﻿using System.Windows;
using System.Windows.Controls;

namespace WPFTestSolution.Pages.Controls.ItemsControls.MenuBases {
    
    /**
     * https://www.bilibili.com/video/BV1bV411A7Eq?p=60
     * 060-ContextMenu上下文菜单(: MenuBase : ItemsControl)
     * https://www.wpfsoft.com/2023/09/08/1933.html
     */
    public partial class _60_ContextMenu_Page : Page {
        public _60_ContextMenu_Page() {
            InitializeComponent();
            this.Title = "060-ContextMenu上下文菜单(: MenuBase : ItemsControl)";
        }

        private void MenuItem_Click(object sender, RoutedEventArgs e) {
            if (sender is MenuItem item) {
                _TextBlock.Text = $"你单击了: {item.Header}";
            }
        }
    }
}